import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

class Chapter13Page extends StatelessWidget {
  const Chapter13Page({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("第十三章"),
        leading: IconButton(
          icon: const Icon(Icons.home),
          onPressed: () => Navigator.of(context).pushNamed("/"),
        ),
      ),
      body: SingleChildScrollView(
        child: Center(
          child: Column(
            children: <Widget>[
              const SelectableText("国际化使用 intl 包"),
              TextButton(
                  onPressed: () =>
                      launch('https://pub.flutter-io.cn/packages/intl'),
                  child: const Text("intl 插件库地址")),
              TextButton(
                  onPressed: () =>
                      launch('https://plugins.jetbrains.com/plugin/13666-flutter-intl'),
                  child: const Text("Android Studio intl 插件库地址")),
            ],
          ),
        ),
      ),
    );
  }
}
